import {Component, Input, OnInit, OnChanges} from '@angular/core';

@Component({
    selector: 'kylin-circuit',
    templateUrl: './circuit.component.html',
    styleUrls: ['./circuit.component.less'],
})
export class CircuitComponent implements OnInit, OnChanges {
    @Input() state;
    @Input() time: any;
    times?: any;
    submitTime;
    provinceDealTime;
    cityDealTime;
    datas = 'yyyy-MM-dd HH:mm:ss';
    constructor() {
    }

    ngOnInit() {

    }

    ngOnChanges(changes): void {
        if (changes.time.currentValue !== undefined) {
            this.times = changes.time.currentValue;
            for (let i = 0; i < this.times.length; i++) {
                this.submitTime = this.times[0] || '未审核';
                this.cityDealTime = this.times[1] || '未审核';
                this.provinceDealTime = this.times[2] || '未审核';
            }
        }
    }
}
